#ifndef __MP_POD_INFO_H__
#define __MP_POD_INFO_H__

#include <string>
#include <stdlib.h>

#include "logger.h"

class PodInfo {
private:
    PodInfo();
    ~PodInfo();

public:
    uint32_t& host_ip();
    std::string host_ip_str();
    uint32_t& pod_ip();
    std::string pod_ip_str();
    std::string& host_name();
    std::string& pod_name();
    std::string& pod_namespace();

    static PodInfo* get_instance();

    static uint32_t ip_convert(std::string ip);
    static std::string ip_convert(uint32_t ip);

private:
    std::string __get_env(std::string name);

private:
    uint32_t m_host_ip;
    uint32_t m_pod_ip;
    std::string m_host_name;
    std::string m_pod_name;
    std::string m_pod_namespace;

    Logger *m_logger = Logger::get_instance();
};

#endif